import React, { Component } from 'react'

class Demo extends Component{
  constructor(props){
    super(props)
    console.log(this)
    console.log(this.props)
  }
  render(){
    // console.log(this)
    // console.log(this.props)
    return <h1>Demo组件 { this.props.msg }</h1>
  }
}

export default class App extends Component {
  // constructor(props){
  //   super(props)
  //   console.log(props)
  //   console.log(this.props)
  // }
  render() {
    return (
      <div>
        <Demo msg='🐂'></Demo>
      </div>
    )
  }
}
